how to solve coding and decoding problems